package com.knowif.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.knowif.enumInfo.UserEnum;
import com.knowif.pojo.TUser;
import com.knowif.pojo.TUserExample;
import com.knowif.pojo.UserOrder;
import com.knowif.pojo.UserOrderExample;

/**
 * 
 * @author xingyao
 * @Description: 该类的功能描述
 */
@Service
public class Manager_service {
	
	
	@Autowired
	private User_service user_service;
	
	
	/**
	 * @author: xingyao 
	 * @Description:  查找管理员
	 * @param example
	 * @return
	 */
	public List<TUser> selectManager(TUserExample example){
		if(example == null){
			return null;
		}
		if(example.getOredCriteria() != null){
			example.getOredCriteria().get(0).andUserTypeEqualTo(UserEnum.MANAGER.getNumber());
		}else{
			example.createCriteria().andUserTypeEqualTo(UserEnum.MANAGER.getNumber());
		}
		List<TUser> tUsers = user_service.selectByTUserExampleAndNOTVirtualUser(example);
		return tUsers;
	}
	
	
	
	public List<UserOrder> selectUserOrderInfo(UserOrderExample orderExample){
		if(orderExample == null){
			return null;
		}
		return null;
	}
	
	
}







